package com.lolc.bean;

import java.util.List;


public class Champion{

	private String id;	
	private String name;
	private List<Pick> 	synergies;
	private List<Pick>  counters;
	private List<Lane>  lanes;

	public Champion()
	{
		super();
	}
	
	public Champion(final String id) {
		super();
		this.id=id;
	}

	public Champion(String id, String name) {
		super();
		this.name = name;
		this.id=id;
	}
	
	/**
	 * 
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * 
	 * @param id, the id to set
	 */
	public void setId(final String id) {
		this.id = id;
	}

	
	/**
	 * @return the counters
	 */
	public List<Pick> getCounters() {
		return counters;
	}

	/**
	 * @param counters the counters to set
	 */
	public void setCounters(final List<Pick> counters) {
		this.counters = counters;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(final String name) {
		this.name = name;
	}

	/**
	 * @return the synergies
	 */
	public List<Pick> getSynergies() {
		return synergies;
	}

	/**
	 * @param synergies the synergies to set
	 */
	public void setSynergies(final List<Pick> synergies) {
		this.synergies = synergies;
	}

	/**
	 * @return the lanes
	 */
	public List<Lane> getLanes() {
		return lanes;
	}
	
	/**
	 * @return the lanes
	 */
	public Lane getLane(final Lane lane) {
		int i = lanes.indexOf(lane);
		if (i != -1){
			return lanes.get(i);
		}
		return null;
	}

	/**
	 * @param lanes the lanes to set
	 */
	public void setLanes(final List<Lane> lanes) {
		this.lanes = lanes;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Champion other = (Champion) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return this.name;
	}
	

}
